//
//  HRZOrderHeadView.m
//  EMarket
//
//  Created by 石头 on 2018/10/11.
//  Copyright © 2018 好日子. All rights reserved.
//

#import "HRZOrderHeadView.h"

#import "HRZOrderModel.h"

@interface HRZOrderHeadView()

@property (nonatomic, strong) UILabel *mOrderNumLabel;
@property (nonatomic, strong) UILabel *mOrderDateLabel;

@end

@implementation HRZOrderHeadView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubview:self.mOrderNumLabel];
        [self addSubview:self.mOrderDateLabel];
        
    }
    return self;
}

- (void)layoutSubviews {
    [self.mOrderNumLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self);
        make.left.mas_equalTo(self).mas_offset(5);
    }];
    
    [self.mOrderDateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       make.bottom.mas_equalTo(self.mOrderNumLabel.mas_bottom);
        make.right.mas_equalTo(self).mas_offset(-10);
    }];
}

#pragma mark - ----  Getter/Setter  ----
- (void)setModel:(HRZOrderModel *)model {
    _model = model;
    self.mOrderNumLabel.text = [NSString stringWithFormat:@" 订单编号:%@", model.orderNumber];
    self.mOrderDateLabel.text = [NSString stringWithFormat:@"2018/10/6 9:23:59"];
}

- (UILabel *)mOrderNumLabel{
    if (!_mOrderNumLabel) {
        _mOrderNumLabel = [[UILabel alloc] init];
        _mOrderNumLabel.font = PFR16Font;
    }
    return _mOrderNumLabel;
}

- (UILabel *)mOrderDateLabel{
    if (!_mOrderDateLabel) {
        _mOrderDateLabel = [[UILabel alloc] init];
        _mOrderDateLabel.font = PFR14Font;
    }
    return _mOrderDateLabel;
}



@end
